\(\int \frac {a+b \csc (c+d \sqrt {x})}{\sqrt {x}} \, dx\) [53]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 20, antiderivative size = 26 \[ \int \frac {a+b \csc \left (c+d \sqrt {x}\right )}{\sqrt {x}} \, dx=2 a \sqrt {x}-\frac {2 b \text {arctanh}\left (\cos \left (c+d \sqrt {x}\right )\right )}{d} \]

[Out]

-2*b*arctanh(cos(c+d*x^(1/2)))/d+2*a*x^(1/2)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {14, 4290, 3855} \[ \int \frac {a+b \csc \left (c+d \sqrt {x}\right )}{\sqrt {x}} \, dx=2 a \sqrt {x}-\frac {2 b \text {arctanh}\left (\cos \left (c+d \sqrt {x}\right )\right )}{d} \]

[In]

Int[(a + b*Csc[c + d*Sqrt[x]])/Sqrt[x],x]

[Out]

2*a*Sqrt[x] - (2*b*ArcTanh[Cos[c + d*Sqrt[x]]])/d

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 4290

Int[((a_.) + Csc[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Csc[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[
(m + 1)/n], 0] && IntegerQ[p]

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {a}{\sqrt {x}}+\frac {b \csc \left (c+d \sqrt {x}\right )}{\sqrt {x}}\right ) \, dx \\ & = 2 a \sqrt {x}+b \int \frac {\csc \left (c+d \sqrt {x}\right )}{\sqrt {x}} \, dx \\ & = 2 a \sqrt {x}+(2 b) \text {Subst}\left (\int \csc (c+d x) \, dx,x,\sqrt {x}\right ) \\ & = 2 a \sqrt {x}-\frac {2 b \text {arctanh}\left (\cos \left (c+d \sqrt {x}\right )\right )}{d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.21 (sec) , antiderivative size = 52, normalized size of antiderivative = 2.00 \[ \int \frac {a+b \csc \left (c+d \sqrt {x}\right )}{\sqrt {x}} \, dx=\frac {2 \left (a \left (c+d \sqrt {x}\right )-b \log \left (\cos \left (\frac {1}{2} \left (c+d \sqrt {x}\right )\right )\right )+b \log \left (\sin \left (\frac {1}{2} \left (c+d \sqrt {x}\right )\right )\right )\right )}{d} \]

[In]

Integrate[(a + b*Csc[c + d*Sqrt[x]])/Sqrt[x],x]

[Out]

(2*(a*(c + d*Sqrt[x]) - b*Log[Cos[(c + d*Sqrt[x])/2]] + b*Log[Sin[(c + d*Sqrt[x])/2]]))/d

Maple [A] (verified)

Time = 0.27 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.23

method result size
derivativedivides \(2 a \sqrt {x}-\frac {2 b \ln \left (\csc \left (c +d \sqrt {x}\right )+\cot \left (c +d \sqrt {x}\right )\right )}{d}\) \(32\)
default \(2 a \sqrt {x}-\frac {2 b \ln \left (\csc \left (c +d \sqrt {x}\right )+\cot \left (c +d \sqrt {x}\right )\right )}{d}\) \(32\)
parts \(2 a \sqrt {x}-\frac {2 b \ln \left (\csc \left (c +d \sqrt {x}\right )+\cot \left (c +d \sqrt {x}\right )\right )}{d}\) \(32\)

[In]

int((a+b*csc(c+d*x^(1/2)))/x^(1/2),x,method=_RETURNVERBOSE)

[Out]

2*a*x^(1/2)-2*b/d*ln(csc(c+d*x^(1/2))+cot(c+d*x^(1/2)))

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.65 \[ \int \frac {a+b \csc \left (c+d \sqrt {x}\right )}{\sqrt {x}} \, dx=\frac {2 \, a d \sqrt {x} - b \log \left (\frac {1}{2} \, \cos \left (d \sqrt {x} + c\right ) + \frac {1}{2}\right ) + b \log \left (-\frac {1}{2} \, \cos \left (d \sqrt {x} + c\right ) + \frac {1}{2}\right )}{d} \]

[In]

integrate((a+b*csc(c+d*x^(1/2)))/x^(1/2),x, algorithm="fricas")

[Out]

(2*a*d*sqrt(x) - b*log(1/2*cos(d*sqrt(x) + c) + 1/2) + b*log(-1/2*cos(d*sqrt(x) + c) + 1/2))/d

Sympy [A] (verification not implemented)

Time = 1.28 (sec) , antiderivative size = 60, normalized size of antiderivative = 2.31 \[ \int \frac {a+b \csc \left (c+d \sqrt {x}\right )}{\sqrt {x}} \, dx=2 a \sqrt {x} + 2 b \left (\begin {cases} \frac {\sqrt {x} \left (\cot {\left (c \right )} \csc {\left (c \right )} + \csc ^{2}{\left (c \right )}\right )}{\cot {\left (c \right )} + \csc {\left (c \right )}} & \text {for}\: d = 0 \\- \frac {\log {\left (\cot {\left (c + d \sqrt {x} \right )} + \csc {\left (c + d \sqrt {x} \right )} \right )}}{d} & \text {otherwise} \end {cases}\right ) \]

[In]

integrate((a+b*csc(c+d*x**(1/2)))/x**(1/2),x)

[Out]

2*a*sqrt(x) + 2*b*Piecewise((sqrt(x)*(cot(c)*csc(c) + csc(c)**2)/(cot(c) + csc(c)), Eq(d, 0)), (-log(cot(c + d
*sqrt(x)) + csc(c + d*sqrt(x)))/d, True))

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.19 \[ \int \frac {a+b \csc \left (c+d \sqrt {x}\right )}{\sqrt {x}} \, dx=2 \, a \sqrt {x} - \frac {2 \, b \log \left (\cot \left (d \sqrt {x} + c\right ) + \csc \left (d \sqrt {x} + c\right )\right )}{d} \]

[In]

integrate((a+b*csc(c+d*x^(1/2)))/x^(1/2),x, algorithm="maxima")

[Out]

2*a*sqrt(x) - 2*b*log(cot(d*sqrt(x) + c) + csc(d*sqrt(x) + c))/d

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.15 \[ \int \frac {a+b \csc \left (c+d \sqrt {x}\right )}{\sqrt {x}} \, dx=\frac {2 \, {\left ({\left (d \sqrt {x} + c\right )} a + b \log \left ({\left | \tan \left (\frac {1}{2} \, d \sqrt {x} + \frac {1}{2} \, c\right ) \right |}\right )\right )}}{d} \]

[In]

integrate((a+b*csc(c+d*x^(1/2)))/x^(1/2),x, algorithm="giac")

[Out]

2*((d*sqrt(x) + c)*a + b*log(abs(tan(1/2*d*sqrt(x) + 1/2*c))))/d

Mupad [B] (verification not implemented)

Time = 19.86 (sec) , antiderivative size = 73, normalized size of antiderivative = 2.81 \[ \int \frac {a+b \csc \left (c+d \sqrt {x}\right )}{\sqrt {x}} \, dx=2\,a\,\sqrt {x}+\frac {2\,b\,\ln \left (\frac {b\,2{}\mathrm {i}-b\,{\mathrm {e}}^{d\,\sqrt {x}\,1{}\mathrm {i}}\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\,2{}\mathrm {i}}{\sqrt {x}}\right )}{d}-\frac {2\,b\,\ln \left (\frac {b\,2{}\mathrm {i}+b\,{\mathrm {e}}^{d\,\sqrt {x}\,1{}\mathrm {i}}\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\,2{}\mathrm {i}}{\sqrt {x}}\right )}{d} \]

[In]

int((a + b/sin(c + d*x^(1/2)))/x^(1/2),x)

[Out]

2*a*x^(1/2) + (2*b*log((b*2i - b*exp(d*x^(1/2)*1i)*exp(c*1i)*2i)/x^(1/2)))/d - (2*b*log((b*2i + b*exp(d*x^(1/2
)*1i)*exp(c*1i)*2i)/x^(1/2)))/d